Skip to content

Conversation

Ecordonnier
Copy link
Contributor

Fix for #1103

When searching for the root-directory of the git repository e.g. with git rev-parse --show-toplevel, git stops the search when reaching $GIT_CEILING_DIRECTORIES. By ignoring this variable, the function _git_toplevel can go above the real git repository (e.g. when packaging a tarball without .git repository), and then runs "git archive" on an unrelated git repository.

Ecordonnier and others added 2 commits February 13, 2025 18:23
Fix for pypa#1103

When searching for the root-directory of the git repository e.g. with git rev-parse --show-toplevel,
git stops the search when reaching $GIT_CEILING_DIRECTORIES. By ignoring this variable, the function
_git_toplevel can go above the real git repository (e.g. when packaging a tarball without .git repository),
and then runs "git archive" on an unrelated git repository.

Signed-off-by: Ross Burton <[email protected]>
Signed-off-by: Etienne Cordonnier <[email protected]>
@Ecordonnier
Copy link
Contributor Author

Note that unfortunately the log.info() call I added is invisible while running as part of a yocto build in the use-case I described in #1103 . It seems that only log-levels at warning or above are shown in this use-case, however this is not really a warning, so I left it at info level.

@Ecordonnier
Copy link
Contributor Author

@rossburton FYI

@RonnyPfannschmidt RonnyPfannschmidt merged commit 98b7078 into pypa:main Feb 21, 2025
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants